import model
import qdrant_cli


class Util:
    def __init__(self):
        super(Util, self).__init__()

        # 替换成你想要的任意模型，插件化设计
        self.ChatLlama2 = None

        # Embedding Model
        self.EmbeddingM3E = None

        # Vector Database Qdrant
        self.qdrant = qdrant_cli.Qdrant()

    def m3e(self):
        if self.EmbeddingM3E is None:
            self.EmbeddingM3E = model.M3E()
        return self.EmbeddingM3E

    def llama(self):
        if self.ChatLlama2 is None:
            self.ChatLlama2 = model.Llama2()
        return self.ChatLlama2
